package com.game.optimize.domain;

import com.game.optimize.enums.ChessColorEnum;
import com.game.optimize.enums.ChessDirectionEnum;
import com.game.optimize.enums.ChessEatRuleEnum;
import com.game.optimize.enums.ChessMoveRuleEnum;


import java.io.Serializable;

/**
 * 棋子基础属性
 *
 * @author Nessis
 * @since 2023-03-02 14:54
 */

public class BaseChess implements Serializable {
    BaseChess(String name, ChessColorEnum colorEnum, ChessMoveRuleEnum moveRuleEnum, ChessEatRuleEnum eatRuleEnum, int x, int y){
        this.name = name;
        this.colorEnum = colorEnum;
        this.moveRuleEnum = moveRuleEnum;
        this.eatRuleEnum = eatRuleEnum;
        this.x = x;
        this.y = y;
    }

    public ChessColorEnum getColorEnum() {
        return colorEnum;
    }

    public void setColorEnum(ChessColorEnum colorEnum) {
        this.colorEnum = colorEnum;
    }

    public Boolean getOverturn() {
        return overturn;
    }

    public void setOverturn(Boolean overturn) {
        this.overturn = overturn;
    }

    public ChessMoveRuleEnum getMoveRuleEnum() {
        return moveRuleEnum;
    }

    public void setMoveRuleEnum(ChessMoveRuleEnum moveRuleEnum) {
        this.moveRuleEnum = moveRuleEnum;
    }

    public ChessEatRuleEnum getEatRuleEnum() {
        return eatRuleEnum;
    }

    public void setEatRuleEnum(ChessEatRuleEnum eatRuleEnum) {
        this.eatRuleEnum = eatRuleEnum;
    }

    public ChessDirectionEnum getDirectionEnum() {
        return directionEnum;
    }

    public void setDirectionEnum(ChessDirectionEnum directionEnum) {
        this.directionEnum = directionEnum;
    }

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

    public int getToX() {
        return toX;
    }

    public void setToX(int toX) {
        this.toX = toX;
    }

    public int getToY() {
        return toY;
    }

    public void setToY(int toY) {
        this.toY = toY;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    /**
     * 棋子名称
     */
    private String name;

    /**
     * 棋子颜色
     * @see ChessColorEnum
     */
    private ChessColorEnum colorEnum;

    /**
     * 阵营翻转(以楚河汉界区分，过河的棋子发生坐标翻转)
     */
    private Boolean overturn;

    /**
     * 棋子行走能力
     * @see ChessMoveRuleEnum
     */
    private ChessMoveRuleEnum moveRuleEnum;

    /**
     * 吃子规则
     * @see ChessEatRuleEnum
     */
    private ChessEatRuleEnum eatRuleEnum;

    /**
     * 棋子行动方向
     * @see ChessDirectionEnum
     */
    private ChessDirectionEnum directionEnum;

    /**
     * 棋子位置。判断棋子位置条件 {棋子颜色、棋子是否翻转、棋子坐标}
     */
    private int x;

    /**
     * 棋子位置。判断棋子位置条件 {棋子颜色、棋子是否翻转、棋子坐标}
     */
    private int y;

    /**
     * 目的坐标x
     */
    private int toX;

    /**
     * 目的坐标y
     */
    private int toY;
}
